import {Service, action} from "adajs";
import ActivityList from "../../lists/theory";

class StudyService extends Service {
    defaultData() {
        return {
            showList: false,
            list: {
                url: "/api/cms/cmsArticle/queryPage",
                type: ActivityList,
                parameter: {
                    // type: "theory",
                    siteId: "cyjlgb",
                    columnId: "THEORYCOLUMN",
                    t: new Date().getTime()
                }
            }
        };
    }

    onupdate(current, data) {
        current.list.parameter.t = data.t;
    }

    @action('showList')
    showList(current) {
        current.showList = true;
    }
}

export default StudyService;